package com.ruoyi.spot.realtime.lastesttrade.service.impl;

import java.util.List;

import com.ruoyi.spot.realtime.lastesttrade.domain.VO.SpotLastesttradeRealtimeDataVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.spot.realtime.lastesttrade.mapper.SpotLastesttradeRealtimeDataMapper;
import com.ruoyi.spot.realtime.lastesttrade.domain.SpotLastesttradeRealtimeData;
import com.ruoyi.spot.realtime.lastesttrade.service.ISpotLastesttradeRealtimeDataService;

/**
 * 实时成交Service业务层处理
 * 
 * @author saumell
 * @date 2024-08-05
 */
@Service
public class SpotLastesttradeRealtimeDataServiceImpl implements ISpotLastesttradeRealtimeDataService 
{
    @Autowired
    private SpotLastesttradeRealtimeDataMapper spotLastesttradeRealtimeDataMapper;

    /**
     * 查询实时成交
     * 
     * @param id 实时成交主键
     * @return 实时成交
     */
    @Override
    public SpotLastesttradeRealtimeDataVO selectSpotLastesttradeRealtimeDataById(Integer id)
    {
        return spotLastesttradeRealtimeDataMapper.selectSpotLastesttradeRealtimeDataById(id);
    }

    /**
     * 查询实时成交列表
     * 
     * @param spotLastesttradeRealtimeData 实时成交
     * @return 实时成交
     */
    @Override
    public List<SpotLastesttradeRealtimeDataVO> selectSpotLastesttradeRealtimeDataList(SpotLastesttradeRealtimeDataVO spotLastesttradeRealtimeData)
    {
        return spotLastesttradeRealtimeDataMapper.selectSpotLastesttradeRealtimeDataList(spotLastesttradeRealtimeData);
    }

    /**
     * 新增实时成交
     * 
     * @param spotLastesttradeRealtimeData 实时成交
     * @return 结果
     */
    @Override
    public int insertSpotLastesttradeRealtimeData(SpotLastesttradeRealtimeData spotLastesttradeRealtimeData)
    {
        return spotLastesttradeRealtimeDataMapper.insertSpotLastesttradeRealtimeData(spotLastesttradeRealtimeData);
    }

    /**
     * 修改实时成交
     * 
     * @param spotLastesttradeRealtimeData 实时成交
     * @return 结果
     */
    @Override
    public int updateSpotLastesttradeRealtimeData(SpotLastesttradeRealtimeData spotLastesttradeRealtimeData)
    {
        return spotLastesttradeRealtimeDataMapper.updateSpotLastesttradeRealtimeData(spotLastesttradeRealtimeData);
    }

    /**
     * 批量删除实时成交
     * 
     * @param ids 需要删除的实时成交主键
     * @return 结果
     */
    @Override
    public int deleteSpotLastesttradeRealtimeDataByIds(Integer[] ids)
    {
        return spotLastesttradeRealtimeDataMapper.deleteSpotLastesttradeRealtimeDataByIds(ids);
    }

    /**
     * 删除实时成交信息
     * 
     * @param id 实时成交主键
     * @return 结果
     */
    @Override
    public int deleteSpotLastesttradeRealtimeDataById(Integer id)
    {
        return spotLastesttradeRealtimeDataMapper.deleteSpotLastesttradeRealtimeDataById(id);
    }

    @Override
    public List<SpotLastesttradeRealtimeDataVO> selectSpotAllData() {
        return spotLastesttradeRealtimeDataMapper.selectSpotAllData();
    }

    @Override
    public Integer queryCurryNumber(String currencyPair) {
        return spotLastesttradeRealtimeDataMapper.queryCurryNumber(currencyPair);
    }
}
